HAL OSPI delay block functions migration ¶
The goal of this page is to show how to migrate the delay block functions.
Set the delay block configuration ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_OSPI_DLYB_SetConfig(OSPI_HandleTypeDef *hospi,
HAL_OSPI_DLYB_CfgTypeDef *pdlyb_cfg);
|
HAL_XSPI_DLYB_SetConfigDelay(hal_xspi_handle_t *hxspi,
uint32_t clock_phase_value);
|
Example usage ¶
|
HAL1 |
HAL2 |
|---|---|
OSPI_HandleTypeDef hospi;
HAL_OSPI_DLYB_CfgTypeDef OSPI_DLYB_Cfg_Struct = {0};
OSPI_DLYB_Cfg_Struct.Units= DLYB_MAX_UNIT;
OSPI_DLYB_Cfg_Struct.PhaseSel= 2;
HAL_OSPI_DLYB_SetConfig(&hospi, &OSPI_DLYB_Cfg_Struct);
|
hal_xspi_handle_t h_xspi;
uint32_t max_clk_phase;
HAL_XSPI_DLYB_SetConfigDelay(&h_xspi, max_clk_phase);
|
Get the delay block configuration ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_OSPI_DLYB_GetConfig(const OSPI_HandleTypeDef *hospi,
HAL_OSPI_DLYB_CfgTypeDef *pdlyb_cfg);
|
HAL_XSPI_DLYB_GetConfigDelay(const hal_xspi_handle_t *hxspi,
uint32_t *p_clock_phase);
|
Example usage ¶
|
HAL1 |
HAL2 |
|---|---|
OSPI_HandleTypeDef hospi;
HAL_OSPI_DLYB_CfgTypeDef OSPI_DLYB_Cfg_Struct = {0};
OSPI_DLYB_Cfg_Struct.Units= DLYB_MAX_UNIT;
OSPI_DLYB_Cfg_Struct.PhaseSel= 2;
HAL_OSPI_DLYB_GetConfig(&hospi, &OSPI_DLYB_Cfg_Struct);
|
hal_xspi_handle_t hxspi;
uint32_t dlyb_cfg_test
HAL_XSPI_DLYB_GetConfigDelay(&hxspi, dlyb_cfg_test);
|
Get the delay line length value ¶
|
HAL1 |
HAL2 |
|---|---|
HAL_OSPI_DLYB_GetClockPeriod(OSPI_HandleTypeDef *hospi,
HAL_OSPI_DLYB_CfgTypeDef *pdlyb_cfg);
|
HAL_XSPI_DLYB_CalculateMaxClockPhase(hal_xspi_handle_t *hxspi,
uint32_t *p_max_clock_phase);
|
Example usage ¶
|
HAL1 |
HAL2 |
|---|---|
XSPI_HandleTypeDef hospi;
HAL_OSPI_DLYB_CfgTypeDef OSPI_DLYB_Cfg_Struct = {0};
OSPI_DLYB_Cfg_Struct.Units= DLYB_MAX_UNIT;
OSPI_DLYB_Cfg_Struct.PhaseSel= 2;
HAL_OSPI_DLYB_GetClockPeriod(&hospi, &OSPI_DLYB_Cfg_Struct);
|
hal_xspi_handle_t XSPIHandle;
uint32_t p_dlyb;
HAL_XSPI_DLYB_CalculateMaxClockPhase(&XSPIHandle, &p_dlyb);
|